<?php

namespace App\Http\Controllers\Mobile;

use App\Model\Leave;
use App\Model\Sch_desc;
use App\Model\Store;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
//数据报表
class Datareport_infoController extends CommonController
{
    //

	protected $Sch_desc;
	protected $Leave;
	protected $Store;
	public function __construct()
	{
		parent::__construct();
		$this->Sch_desc=new Sch_desc();
		$this->Leave=new Leave();
		$this->Store=new Store();
	}


//	首页
	public function index(Request $request){
		$where['time']=$request->time;
		$where['store_id']=$request->store_id;
		try{
			$data=null;
		}catch (Exception $exception){
			$message=$exception->getMessage();
		}

		if(!isset($message)){
			return $this->success($data);
		}else{
			return $this->failed($message);
		}
	}

//	中止记录列表
	public function leavel_list(Request $request){
		$where['time']=$request->time;
		$where['store_id']=$request->store_id;
		try{
			$data=null;
		}catch (Exception $exception){
			$message=$exception->getMessage();
		}

		if(!isset($message)){
			return $this->success($data);
		}else{
			return $this->failed($message);
		}
	}


//	移动管理端店铺列表
	public function store(Request $request){
		$company_id=$this->company_id;
		try{
			$data=$this->Store->where(['company_id'=>$company_id ])->select('id','name')->get();
		}catch (Exception $exception){
			$message=$exception->getMessage();
		}

		if(!isset($message)){
			return $this->success($data);
		}else{
			return $this->failed($message);
		}
	}


}
